import { request } from "@/utils/request.js";
//文章的接口
export function getChannelAPI () {
    return request({
        url:'/channels',
        method:'GET',
         
    })
}
//表单提交接口
export function createArtileAPI(data) {
    return request({
        url:'/mp/articles?draft=false',
        method:'POST',   
        data//固定学法
    })
}
//更新表单提交接口
export function updateArtileAPI(data) {
    return request({
        url:`/mp/articles/${data.id}?draft=false`,
        method:'PUT',   
        data//固定学法
    })
}
//列表渲染接口
export function  getArticleListAPI(params) {
     return request({
        url:"/mp/articles",
        method:'GET',
        params
    })
}
//删除列表接口
export function DeleteAPI(id){
    return request({
        url:`/mp/articles/${id}`,
        method:'DELETE'
    })
}
//获取文章详情
export function getArticleId(id) {
    return request({
        url:`/mp/articles/${id}`//get

    })
}